#pragma once
#include "Texture.h"
#include "glm/glm.hpp"
namespace Orange {
	class SubTexture2D {
	public:
		SubTexture2D(const Ref<Texture>& texture, const glm::vec2& min, const glm::vec2& max);
		~SubTexture2D();

		const glm::vec2* GetTexCoord()const { return m_TexCoord; };
		 Ref<Texture> GetTexture() const { return m_Texture; };

		static Ref<SubTexture2D> Create(const Ref<Texture>& texture, const glm::vec2& coord, const glm::vec2& spriteSize);

	private:
		glm::vec2 m_TexCoord[4];
		Ref<Texture> m_Texture;
	};
}
